import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class Player {
    private List<Card> cards =new ArrayList<>();
    private String name;
    public Player(String name){
        this.name=name;
    }
    public void  receiveCard(Card card){
        cards.add(card);
    }
    public void showCards(){
        //排序的准备工作
        cards.sort(new Comparator<Card>() {
            @Override
            public int compare(Card o1, Card o2) {
                return o1.getT_size()-o2.getT_size();
            }
        });

        System.out.println();
        System.out.print(name+" : ");
        for(Card every :cards){
            System.out.print(every+"");
        }
        System.out.println();
    }
}
